﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="{$cfg_site_description}" />

<title>我的訂單|個人中心|{$cfg_site_name}</title>
{template 'header'}
<body>
<div id="buy917_wrap">   
    <div id="buy917_header">
    	<div id="buy917_logo"><a href="index.php">Buy917</a></div>
        <div class="buy917_header_banner">
        	<div class="buy917_header_topbanner">
            	{template 'login_line'} <!-- login_line.html 登入/註冊按鈕 --> 
				<?php include("admin/event.php")?>
            </div>
          	<div class="buy917_header_select">
            	<div class="buy917_header_city">
                	 {if !empty($_cityid)}
                    <div class="guides">
                        <div class="city">
                            <h2>{$_cityname}</h2>
                        </div>
                        <div id="guides-city-change" class="change">切換城市</div>
                        <div id="guides-city-list" class="city-list">
                            <ul>
                            {loop $_citylist $v}
                                <li {if $v['cid']==$_cityid}class="current"{/if}><a href="index.php?cityid={$v['cid']}">{$v['cityname']}</a></li>
                            {/loop}
                            </ul>                   
                        </div>
                    </div>
                    {/if}	
                </div>
                <div class="buy917_header_group">
                	{template 'headergroup'}	
                </div>
            </div>
       </div>
    </div><!-- buy917_header -->
  
   {template 'menu_nav'} <!-- menu 導覽頁 --> 
       
    <div id="buy917_middle">
        	<div class="buy917_grouplist_top"></div>      
            <div class="buy917_grouplist_body"> 
                <h2 class="abouth2">
					<ul>
						<li><a href="m.php?action=bond&type=available">我的團購券</a><span></span></li>
						<li class="current"><a href="m.php?action=orders&type=all">我的訂單</a><span></span></li>
						<li><a href="m.php?action=account">帳戶餘額</a><span></span></li>
						<li><a href="m.php?action=settings">帳戶設置</a><span></span></li>
					</ul>
				</h2>
        		 <div id="coupons">
		<div id="content" class="coupons-box">
			<div class="box-top"></div>
            <div class="box-content">
                <div class="head">                
                <ul class="filter"><li class="label"><b>分類:</b> </li><li {if $type=='all'}class="current"{/if}><a href="{$theurl}&type=all">全部</a></li><li {if $type=='new'}class="current"{/if}><a href="{$theurl}&type=new">未付款</a></li><li {if $type=='payed'}class="current"{/if}><a href="{$theurl}&type=payed">已付款</a></li></ul>                </div>
                <div class="sect">
                {if empty($value)}                       
                                        
                <div class="notice">
                    您還沒有下訂單
				</div>                    
                 {else}
                    <table width="98%" border="0" cellpadding="0" cellspacing="0" class="coupons-table" id="order-list">
						<tbody><tr><th width="270">團購項目</th><th width="50">數量</th><th width="90">總價</th><th width="90">訂單狀態</th><th width="70">操作</th></tr>
					 {loop $value $r}
                    {if $r['gtitle'] !=null}
						<tr {if $n%2==0} class="alt"{else}{/if}>
                        <td style="text-align: left;"><a target="_blank" href="view.php?gid={$r['gid']}" class="deal-title">{$r['gtitle']}</a></td><td>{$r['num']}</td><td><span class="money">$</span>{$r['order_total_price']}</td><td>
							{if $timestamp>$r['group_end_time'] && $r['money_state']==0}							
								已過期 
								{elseif $r['state']==2}
								已取消
								{elseif $r['money_state']==0}
								未付款
								{elseif $r['money_state']==1}
								部分付款(已收${$r['order_incharge']})
								{elseif $r['money_state']==2}
								  {if $r['shipping_state']==1}已發貨{else}已付款{/if}
								{else}						   
							{/if}
							</td><td class="op">							
							{if $timestamp>$r['group_end_time'] && $r['money_state']==0}
							{elseif $r['state']==2}
							已取消
							{elseif $r['money_state']==0}
							<a href="ordercheck.php?oid={$r['oid']}">付款</a> &nbsp;&nbsp;<a href="{$theurl}&type=clear&oid={$r['oid']}">取消</a>
							{elseif $r['money_state']==1}
							<a href="ordercheck.php?oid={$r['oid']}">付款</a>
							{else}
							
						{/if}
                        {/if}
						</td></tr>
					{/loop}
   
                    </tbody></table>
                  <ul class="paginator">
                  {echo pagelist($total,$pagesize,$page,$theurl."&type=$type");}
                </ul>   
                 {/if}

              </div>
            </div>
            <div class="box-bottom"></div>
        </div>
    </div>
    <div id="sidebar">
        <div class="sbox">
            <div class="sbox-top"></div>
            <div class="sbox-content">

                <div class="side-tip">
                    <h3 class="first">我已支付成功，為什麼沒有？</h3>
                    <p>因為還沒有到達最低團購人數，一但湊夠人數，您就會看到{$cfg_groupbond_name}了。</p>
                    <h3>什麼是已過期訂單？</h3>
                    <p>如果某個訂單未及時付款，那麼等團購結束時就無法再付款了，這種訂單就是過期訂單。</p>
                </div>
            </div>

            <div class="sbox-bottom"></div>
        </div>
    </div>
</div>
            </div><!-- buy917_grouplist_body -->
            <div class="buy917_grouplist_bottom"></div>
    </div><!-- buy917_middle -->
</div><!-- buy917wrap -->
<!-- footer -->
<div id="buy917_footer">
	{template 'footer'}	
</div>
</body>
</html>
